package net.lgy.service;

import net.lgy.controller.req.*;
import net.lgy.dto.*;
import net.lgy.model.AccountFileDO;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface AccountFileService {
    /**
     * 创建文件夹
     *
     * @param createRootFolderReq
     * @return
     */
    Long createFolder(FolderCreateReq createRootFolderReq);

    /**
     * 获取文件列表
     * @param accountId
     * @param parentId
     * @return
     */
    List<AccountFileDTO> listFile(Long accountId, Long parentId);

    Boolean renameFile(FileUpdateRequest request);

    List<FolderTreeNodeDTO> folderTree(Long accountNo);
//    第二个版本
    List<FolderTreeNodeDTO> folderTreeV2(Long accountNo);

    Boolean fileUpload(FileUploadRequest request);

    Boolean moveBatch(FileBatchRequest request);

    Boolean deleteBatch(FileDelRequest request);

    boolean checkAndUpdateCapacity(Long accountNo, Long fileSize);


    Boolean copyBatch(FileBatchRequest request);


    Boolean SecondBatch(FileSecondUploadRequest request);

    void findAllAccountFileDOWithRecur(List<AccountFileDO> accountFileDOList,
                                              List<AccountFileDO> prepareAccountFileDOS, boolean onlyFolder);

    List<AccountFileDTO> search(Long accountNo, String search);

    List<FileDownloadDTO> batchDownloadUrl(FileBatchDownloadRequest request);

    String ImgUpload(MultipartFile file);

    AccountFileDO findParentIdByPhone(String phone);
}
